#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<string.h>
#include<stdlib.h>

int main()
{
    printf("printf\n");
    fprintf(stdout, "fprintf\n");
    fputs("fputs\n", stdout);

    write(1, "write\n", strlen("write\n"));

    fflush(stdout);
    fork();









    //int fd = open("./log.txt", O_WRONLY | O_CREAT | O_TRUNC, 0666);
    //if(fd < 0)
    //{
    //    perror("open");
    //    return 1;
    //}

    //dup2(1,fd);
    //char buf[64];
    //memset(buf, '\0', sizeof buf);

    //read(0, buf, sizeof buf);
    //write(fd, buf, strlen(buf));
    //printf("%d\n", fd);
    ////close(fd);
    return 0;
}
